|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectj3deditor.bin.hierarchy.HierarchyNode
j3deditor.bin.hierarchy.J3DeScene
public class J3DeScene
Represents one scene.
Contains an instance of javax.media.j3d.BranchGroup
and list of nodes attached directly to it.
BranchGroup| Constructor Summary | |
|---|---|
J3DeScene(java.lang.String name)
Creates an instance of J3DeScene with the given name. |
|
J3DeScene(java.lang.String name,
java.lang.String filePath)
Creates an instance of J3DeScene with the given name
and if possible loads its contents from specified file. |
|
| Method Summary | |
|---|---|
void |
addNewObject(J3DeObject object)
Adds the specified object to this scene. |
void |
addNewObjects(J3DeObject[] objects)
Adds an array of objects to this scene. |
void |
copyObjects()
Copies all selected objects from this scene. |
void |
cutObjects()
Cuts all selected objects from this scene. |
void |
deleteObjects(HierarchyNode[] objects)
Deletes specified objects from this scene. |
void |
deleteScene()
Detaches BranchGroup object and removes
this scene from HierarchyManager that contains it. |
void |
detach()
Detatces BranchGroup. |
javax.media.j3d.BranchGroup |
getBranchGroup()
Returns the BranchGroup object of
this scene. |
J3DeCamera |
getCamera()
Returns the J3DeCamera object that
manages the ViewingPlatform of this scene. |
HierarchyNode |
getChild(int index)
Returns the child at the specified index. |
HierarchyNode[] |
getCopiedObjects()
Returns the array of copied objects. |
java.lang.String |
getFile()
Returns the name of file bounded to this scene. |
int |
getIndexOfChild(HierarchyNode child)
Returns the index of specified child. |
int |
getNumberOfChildren()
Returns the number of children. |
HierarchyNode[] |
getSelectedObjects()
Returns the array of selected objects. |
protected boolean |
hasNamedChild(HierarchyNode object)
Tests if this node has child which name equals to the name of the given node. |
void |
pasteContent(HierarchyNode[] objects)
Pastes specified objects to this scene. |
protected void |
removeChild(HierarchyNode child)
Removes the specified child node. |
void |
setFile(java.lang.String fileName)
Sets the name of the file bounded to this scene. |
void |
setSelectedObject(HierarchyNode object)
Sets one object to be selected. |
void |
setSelectedObjects(HierarchyNode[] objects)
Sets the array of selected objects. |
| Methods inherited from class j3deditor.bin.hierarchy.HierarchyNode |
|---|
clone, equals, getIndex, getParent, getParent, getType, setName, setParent, toString, updateName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public J3DeScene(java.lang.String name)
J3DeScene with the given name.
name - the name of the new scene
public J3DeScene(java.lang.String name,
java.lang.String filePath)
J3DeScene with the given name
and if possible loads its contents from specified file.
name - the name of the new scenefilePath - the path of file the contents of the scene
will be loaded from| Method Detail |
|---|
protected void removeChild(HierarchyNode child)
removeChild in class HierarchyNodechild - child node to be removedpublic HierarchyNode getChild(int index)
getChild in class HierarchyNodeindex - index of child
public int getNumberOfChildren()
getNumberOfChildren in class HierarchyNodepublic int getIndexOfChild(HierarchyNode child)
getIndexOfChild in class HierarchyNodechild - child node which index will be returned
protected boolean hasNamedChild(HierarchyNode object)
hasNamedChild in class HierarchyNodeobject - node which name will be tested
true if the name of the given
node equals to the name of this node,
otherwise falsepublic javax.media.j3d.BranchGroup getBranchGroup()
BranchGroup object of
this scene.
BranchGroup
object of this scenepublic J3DeCamera getCamera()
J3DeCamera object that
manages the ViewingPlatform of this scene.
getCamera in interface VirtualScenepublic void addNewObject(J3DeObject object)
object - object to be addedpublic void addNewObjects(J3DeObject[] objects)
objects - array of objects to be addedpublic void copyObjects()
public void cutObjects()
public void pasteContent(HierarchyNode[] objects)
pasteContent in interface Pasteableobjects - array of objects to be pastedpublic void deleteObjects(HierarchyNode[] objects)
objects - objects to be deletedpublic void setSelectedObject(HierarchyNode object)
object - object to be set selectedpublic void setSelectedObjects(HierarchyNode[] objects)
objects - array of objects to be set selectedpublic HierarchyNode[] getSelectedObjects()
public HierarchyNode[] getCopiedObjects()
public void detach()
public void deleteScene()
BranchGroup object and removes
this scene from HierarchyManager that contains it.
public java.lang.String getFile()
public void setFile(java.lang.String fileName)
fileName - new name of the file
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||